1. Field of the Invention
The present invention relates to a MAC bridge to which a plurality of networks or a plurality of terminals are connected.
2. Description of the Related Art
A media Access Control (hereinafter referred to as MAC) bridge is a repeater which makes use of data communication system of a data link layer or a MAC layer in IEEE 802.3, and connects a plurality of different LAN (Local Area Network) to each other and a plurality of terminals to each other, thus performing a packet communication between networks as well as between terminals.
Each terminal on the network has an individual address for identifying it from others. This individual address includes a logical address (network address) defined by a network layer and a physical address defined by a data link layer. Under network environments in which the MAC bridge is used, an IP address is mentioned as an example of the logical address, and a MAC address is mentioned as an example of the physical address. The IP address is for identifying individual terminals connected to the network. From the viewpoint of a network constitution, the system of IP address is planned in minute detail and the IP address may not overlap others. For this reason, when the terminal is connected to the network, a correct IP address must be set in the individual terminal according to addressing scheduled in the network.
Generally, the IP address is individually allocated to the terminal by a network manager except the case where the IP address is automatically allocated to the terminal by use of a dedicated server or the like. Specifically, the user himself/herself sets the IP address allocated by the network manager in the terminal, whereby this terminal becomes available in the network.
On the other hand, with respect to the MAC address, manufactures usually allocate it to each apparatus, which is inherent to the apparatus, and the MAC address never overlaps other addresses.
Herein, a schematic constitution view of a conventional network system using a MAC bridge M is show in FIG. 1. The MAC bridge M is described as a MAC bridge for relaying a packet between LANs.
In general, repeater functions of the MAC bridge M include a function to shape the waveform of the packet transmitted when the packet received from a port of an apparatus of itself is relayed to other ports. However, an essential function of the MAC bridge M is a filtering function to transmit the received packet to other ports selectively. An automatic address learning function for preparing an address table automatically in which the relay destinations of the packets are described is used to realize this filtering function.
As shown in FIG. 1, for example, when a terminal A1 connected to a LAN (A) transmits a packet to a terminal A2 which is one of the terminals belonging to the same segment, the communication within the segment of the LAN, which is a fundamental unit in the LAN, adopts a broadcasting type in many cases which informs packet information to all terminals connected to the LAN collectively. Accordingly, the packet transmitted by the terminal A1 arrives at a port A of the MAC bridge M in addition to the terminal A2. At this time, the MAC bridge M does not relay the packet received at the port A to ports B and C.
On the other hand, when the terminal A1 transmits the packet to a terminal B1 connected to another LAN (B), the packet transmitted by the terminal A1 arrives at the port A of the MAC bridge M as well as at all terminals connected to the LAN (A). At this time, the MAC bridge M extracts a destination address existing in a header portion of the packet and retrieves an address table 5 managed within the MAC bridge M as to which port a terminal having an identical address to this extracted address is connected to, thus transmitting the packet to the corresponding port to perform the relay of the packet.
It is called filtering of the packet that the packet received in the above described manner is relayed according to demand and the packet is not relayed if unnecessary.
To perform this filtering, the address table 5 describing which port of the MAC bridge M each terminal device is connected is necessary.
In the address table 5, stored are at least three items including: addresses of the terminals connected to the MAC bridge M through the LAN, port numbers of the MAC bridge M to which the LAN connected to the terminals is connected, and collateral information describing matters relating to the above two items in order to ensure that they correspond to each other.
In the foregoing packet, at least a destination address, a source address and data are included. Upon receipt of the packet, the MAC bridge M extracts the destination address from the packet, and retrieves whether a terminal address coincident with the destination address exists in the address table 5.
Then, when the destination address included in the packet is coincident with the terminal address of the address table 5, (that is, when the terminal which receives the packet is previously registered in the MAC bridge M), and when the port number which received the packet is coincident with the portion number recorded in a corresponding record of the address table 5, the MAC bridge M does not output the received packet from any port.
Specifically, when the transmission side terminal and the receiving side terminal transmit/receive the packet in the same LAN, the MAC bridge M abandons the packet even when the MAC bridge receives the packet.
On the other hand, when the destination address included in the packet is coincident with the terminal address of the address table 5 and the port number which received the packet is different from the port number recorded in the corresponding record, that is, the record in which information relating to the address of the destination terminal is recorded, and when there is no collateral information notifying that transmitting of the packet to other ports in the MAC bridge M is inhibited, the received packet relayed to a port recorded in the corresponding recorded. In other words, the packet is relayed to another LAN.
Moreover, when the terminal address coincident with the destination address of the received packet does not exist in the address table 5, the packet is in many cases relayed to all of other ports other than the port which received the packet, even though the processing concerning the packet differs depending on the apparatuses.
As described above, to allow the MAC bridge M to exhibit the filtering function, the address table 5 is necessary. To register the information relating to the addresses of the terminals in the address table 5, there are two ways. One is manual registering, and the other is registering by means of the automatic address learning function of the MAC bridge M.
To perform the automatic address learning by the MAC bridge M, the automatic address learning of the MAC bridge M is performed according to the following procedures. Specifically, (1) the packet is received through any of the ports of the MAC bridge M, (2) the source address is extracted from the packet, (3) it is retrieved whether the source address has already existed on the address table 5, and (4), if the source address does not exist on the address table 5, a record is additionally registered in the address table 5 so that the record corresponds to the port number of the MAC bridge which received the packet, (5) when the combination of the source address and the port number, previously stored in the address table 5, is different from that of the source address and port number of the actually received packet though the source address exists in the address table 5, the address table 5 is updated so as to correspond to the port which received the packet.
As described above, the automatic address learning is performed according to the procedures (1) to (5), and the address table 5 is prepared. When the packet is received, the filtering function for transmitting the packet selectively from the port according to the address table 5 is realized.